
#ifndef  HASHINVOKER_H
#define  HASHINVOKER_H

//class Command;
//class Hash;
#include <cstddef>

class HashInvoker {
public:
    typedef long long cmd_id_t;
    static HashInvoker * create();
    ~HashInvoker();

    int run(cmd_id_t cmdId, void * req);



    void clear();
    int add(cmd_id_t cmdId, void * cmd);
    void remove(cmd_id_t cmdId);
    bool isExist(cmd_id_t cmdId);
    bool isNotExist(cmd_id_t cmdId) {return !isExist(cmdId);}
    size_t count() const;


private:
    HashInvoker();
    //Hash * commands_;
};


#endif   /* HASHINVOKER_H */
